package me.kafeitu.activiti.chapter5.deployment;

import static org.junit.Assert.assertEquals;

import java.util.List;

import org.activiti.engine.identity.Group;
import org.activiti.engine.identity.User;
import org.activiti.engine.repository.Deployment;
import org.junit.Test;

import me.kafeitu.activiti.AbstractTestMysql;

/**
 * 删除用户和组
 * @author luodan
 *
 */
public class DeploymentServiceClean extends AbstractTestMysql{

    /**
     * clean user and group
     */
    @Test
    public void testDelete() throws Exception {
        List<Deployment> list = repositoryService.createDeploymentQuery().list();
        for (Deployment dep:list) {
            String deploymentId = dep.getId();
            logger.info(dep.getId() + " ," + dep.getName());
            // delete 流程
            repositoryService.deleteDeployment(deploymentId, true);
        }
    }

}
